<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>产品</title>
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/product.css">
</head>

<body>
    <header class="header">
        <div class="logo">
            <img style="width: 50px;border-radius: 50%;margin-right: 20px;"
                src="https://img0.baidu.com/it/u=1155563640,2612093044&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
                alt="">
            健康食品
        </div>
        <nav class="nav">
            <a href="./main.html" class="nav-item">首页</a>
            <a href="./product.html" class="nav-item active">产品</a>
            <a href="./service.html" class="nav-item">评价</a>
            <a href="./our.html" class="nav-item">关于我们</a>
            <a href="./withour.html" class="nav-item">联系我们</a>
        </nav>
        <img src="https://img1.baidu.com/it/u=1207015496,2831434052&fm=253&fmt=auto&app=120&f=JPEG?w=504&h=500"
            alt="用户头像" class="user-avatar">
    </header>
    <main>
        <div class="bg">
            <div class="bg-text">
                <p>健康食品</p>
                <p>HEALTH FOOD</p>
            </div>
        </div>
        <div class="searchBox">
            <input id="input" type="text" placeholder="搜索食品...">
            <button onclick="handleSeach()">搜索</button>
        </div>
        <!-- 分类选项卡 -->
        <nav class="category-nav">
            <ul class="category-tabs">
                <li class="tab-item active" data-category="product">健康产品</li>
                <li class="tab-item" data-category="breakfast">健康早餐</li>
                <li class="tab-item" data-category="lunch">健康午餐</li>
                <li class="tab-item" data-category="dinner">健康晚餐</li>
                <li class="tab-item" data-category="vegetable">健康蔬菜</li>
                <li class="tab-item" data-category="nuts">坚果类</li>
                <li class="tab-item" data-category="fruits">水果类</li>
                <li class="tab-item" data-category="seafood">海鲜类</li>
                <li class="tab-item" data-category="dairy">奶制品</li>
                <li class="tab-item" data-category="lowsugar">低糖食品</li>
            </ul>
        </nav>
        <!-- 分类内容区 -->
        <div class="category-content active" data-category="product">
            <div class="cardBox">
                <div class="card" data-categories="lunch">
                    <img class="cardimg"
                        src="https://omo-oss-image.thefastimg.com/portal-saas/new2023082522101567997/cms/image/0ecc08e5-abcc-440d-8092-b036eab07592.jpg_290xaf.jpg"
                        alt="咸鸭蛋">
                    <div class="exp">
                        咸鸭蛋
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg"
                        src="https://omo-oss-image.thefastimg.com/portal-saas/new2023082522101567997/cms/image/f98e09a0-d923-420f-8b71-cb78ca51a79e.jpg_290xaf.jpg"
                        alt="熟咸蛋">
                    <div class="exp">
                        熟咸蛋
                    </div>
                </div>
                <div class="card" data-categories="breakfast">
                    <img class="cardimg"
                        src="https://img1.baidu.com/it/u=3754913717,3965600507&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=750"
                        alt="燕麦">
                    <div class="exp">
                        燕麦
                    </div>
                </div>
                <div class="card" data-categories="breakfast">
                    <img class="cardimg"
                        src="https://img1.baidu.com/it/u=3510156948,2090022679&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1200"
                        alt="豆浆">
                    <div class="exp">
                        豆浆
                    </div>
                </div>
                <div class="card" data-categories="vegetable">
                    <img class="cardimg"
                        src="https://img2.baidu.com/it/u=729869540,741780846&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800"
                        alt="菠菜">
                    <div class="exp">
                        菠菜
                    </div>
                </div>
                <div class="card" data-categories="dinner">
                    <img class="cardimg"
                        src="https://img2.baidu.com/it/u=2119233108,2551963653&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500"
                        alt="小圣女果">
                    <div class="exp">
                        小圣女果
                    </div>
                </div>
                <div class="card" data-categories="dinner">
                    <img class="cardimg" src="https://iphoto.mac89.com/photo/180411/180411_124/snmPQYtBFN_small.jpg"
                        alt="浆果">
                    <div class="exp">
                        浆果
                    </div>
                </div>
                <div class="card" data-categories="dinner">
                    <img class="cardimg"
                        src="https://img1.baidu.com/it/u=3282305723,3197780719&fm=253&fmt=auto&app=138&f=JPEG?w=760&h=760"
                        alt="核桃">
                    <div class="exp">
                        核桃
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg"
                        src="https://imgservice.suning.cn/uimg1/b2c/image/JOjSmgudPBCiE_24kM4d7g.jpg_800w_800h_4e"
                        alt="猪后腿肉">
                    <div class="exp">
                        猪后腿肉
                    </div>
                </div>
                <div class="card" data-categories="breakfast">
                    <img class="cardimg"
                        src="https://img0.baidu.com/it/u=1340374645,727917909&fm=253&fmt=auto&app=120&f=JPEG?w=607&h=418"
                        alt="鸡蛋">
                    <div class="exp">
                        鸡蛋
                    </div>
                </div>
                <div class="card" data-categories="breakfast">
                    <img class="cardimg"
                        src="https://pic.rmb.bdstatic.com/bjh/241223/dump/64177f7ab97ecc94810aee8e9d5def0f.jpeg"
                        alt="牛奶">
                    <div class="exp">
                        牛奶
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg"
                        src="https://gips3.baidu.com/it/u=3527023194,4164056528&fm=3074&app=3074&f=JPEG?w=1621&h=1050&type=normal&func="
                        alt="挪威青花鱼">
                    <div class="exp">
                        挪威青花鱼
                    </div>
                </div>
            </div>
        </div>

        <!-- 其他分类内容区 -->
        <div class="category-content" data-category="breakfast">
            <div class="cardBox">
                <!-- 早餐分类产品 -->
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img1.baidu.com/it/u=3741825465,2324829923&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=1067"
                        alt="">
                    <div class="exp">
                        全麦吐司
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=2513123359,3841969839&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=667"
                        alt="">
                    <div class="exp">
                        燕麦粥
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img1.baidu.com/it/u=2379856308,950006263&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1422"
                        alt="">
                    <div class="exp">
                        水果沙拉
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/HZpFwgghh0yynizYNBH1TWNUQm235sN0bf4iMcFLg1PGrJw0LHxnoC2W1HJHsNeU.jpg"
                        alt="">
                    <div class="exp">
                        三鲜混沌面
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="lunch">
            <div class="cardBox">
                <!-- 午餐分类产品 -->
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://p3.itc.cn/q_70/images01/20230703/2940d48cdffb4428a96add16456b0572.jpeg"
                        alt="">
                    <div class="exp">
                        轻食套餐
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/_nvTsSEUCiIYAtLuKrlXx5NAaFffwiWnDOIoWRFLx4SpOqHdTb-Y0VWbeMeRxizi.jpg"
                        alt="">
                    <div class="exp">
                        素食套餐
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/RrPMyZ2yiC6SlxKY1GlJ9EUy4DcD2fvFK2puyrYaEMzWkwfsMPSsryDfsnqPD_Yi.jpg"
                        alt="">
                    <div class="exp">
                        健身套餐
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/UQYJWtVTijaFbAG16Lhh1OLqZHGubiABMDYdyTxh0sX1JqNcWwFU-9phykgJcvQC.jpg"
                        alt="">
                    <div class="exp">
                        儿童套餐
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://www.wxybdcy.com/data/images/product/20220530155332_756.jpg"
                        alt="">
                    <div class="exp">
                        商务套餐
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="dinner">
            <div class="cardBox">
                <!-- 晚餐分类产品 -->
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img0.baidu.com/it/u=4167398134,1157674333&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=658"
                        alt="">
                    <div class="exp">
                        深海鱼套餐
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/Lnl7ZA7HdNvRlu5VZNZoTDvzhPqe4-pmS9LPt-3rfixmjDt2OW_Af5Bp18shWGUp.jpg"
                        alt="">
                    <div class="exp">
                        素食意面
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img0.baidu.com/it/u=3832236925,2402009562&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=667"
                        alt="">
                    <div class="exp">
                        养生粥品
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=4155083094,127052823&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1067"
                        alt="">
                    <div class="exp">
                        单人小火锅
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://p0.meituan.net/biztone/4bb380c451e4609e677ea04535143a003067224.jpg%40watermark%3D0"
                        alt="">
                    <div class="exp">
                        助眠套餐
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="vegetable">
            <div class="cardBox">
                <!-- 蔬菜分类产品 -->
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=3202993793,4144174053&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500"
                        alt="">
                    <div class="exp">
                        有机菠菜
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=3552880498,3613764023&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=334"
                        alt="">
                    <div class="exp">
                        胡萝卜
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img0.baidu.com/it/u=2257255049,3502809684&fm=253&fmt=auto&app=120&f=JPEG?w=1199&h=800"
                        alt="">
                    <div class="exp">
                        西兰花
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/V3gororwkdVPbHK0u1ZBReICN1TsfNSAFXjFAFPK4ki56EISlgjLzgwh0hzIGbsL.jpg"
                        alt="">
                    <div class="exp">
                        樱桃番茄
                    </div>
                </div>
                <div class="card" data-categories="lunch">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=3181803862,4204178608&fm=253&fmt=auto&app=138&f=JPEG?w=524&h=350"
                        alt="">
                    <div class="exp">
                        有机彩椒
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="nuts">
            <div class="cardBox">
                <!-- 坚果类产品 -->
                <div class="card" data-categories="nuts">
                    <img class="cardimg" src="https://img1.baidu.com/it/u=2221052629,4173471472&fm=253&fmt=auto&app=138&f=JPEG?w=574&h=440"
                        alt="">
                    <div class="exp">
                        开心果
                    </div>
                </div>
                <div class="card" data-categories="nuts">
                    <img class="cardimg" src="https://img.yimutian.com/sells/65d71cea2d211f710221888301ed01ed-800-.jpeg"
                        alt="">
                    <div class="exp">
                        巴旦木
                    </div>
                </div>
                <div class="card" data-categories="nuts">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=537086297,1797170929&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=755"
                        alt="">
                    <div class="exp">
                        腰果
                    </div>
                </div>
                <div class="card" data-categories="nuts">
                    <img class="cardimg" src="https://pic.rmb.bdstatic.com/bjh/240311/4471be774ccb9f872d8563c721f4e1431053.jpeg@h_1280"
                        alt="">
                    <div class="exp">
                        夏威夷果
                    </div>
                </div>
                <div class="card" data-categories="nuts">
                    <img class="cardimg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fci.xiaohongshu.com%2Fa22261ca-87d7-09bb-9203-5b9d4240f245%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fci.xiaohongshu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1748354859&t=f37f591a0254bafabc863ff87afc2a48"
                        alt="">
                    <div class="exp">
                        松子
                    </div>
                </div>
                <div class="card" data-categories="nuts">
                    <img class="cardimg" src="https://img0.baidu.com/it/u=658075331,502143814&fm=253&app=138&f=JPEG?w=800&h=1419"
                        alt="">
                    <div class="exp">
                        花生
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="fruits">
            <div class="cardBox">
                <!-- 水果类产品 -->
                <div class="card" data-categories="fruits">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/YNqAzgWRexZ4g4TlnvCdXqb19Xp3iC37_8rjnQSOpSxMGmi1e4xEyNRs4L93muE8.jpg"
                        alt="">
                    <div class="exp">
                        蓝莓
                    </div>
                </div>
                <div class="card" data-categories="fruits">
                    <img class="cardimg" src="https://www.liangyiyy.com/uploads/20241024/4e9eb29be465fb77bad9a74a26fad56a.jpg"
                        alt="">
                    <div class="exp">
                        奇异果
                    </div>
                </div>
                <div class="card" data-categories="fruits">
                    <img class="cardimg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fi1%2F3006778022%2FO1CN01fb1ofn29882IMkuXI_%21%213006778022.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1748354922&t=0c8a43264da93a16d21e6dc6ac385a24"
                        alt="">
                    <div class="exp">
                        牛油果
                    </div>
                </div>
                <div class="card" data-categories="fruits">
                    <img class="cardimg" src="https://b0.bdstatic.com/45191de5ec4881e832aa3caa6adf355d.jpg@h_1280"
                        alt="">
                    <div class="exp">
                        火龙果
                    </div>
                </div>
                <div class="card" data-categories="fruits">
                    <img class="cardimg" src="https://q9.itc.cn/q_70/images03/20240819/36775214b1ae4785a5d29174b9bc0f6d.jpeg"
                        alt="">
                    <div class="exp">
                        山竹
                    </div>
                </div>
                <div class="card" data-categories="fruits">
                    <img class="cardimg" src="https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2024%2F0204%2F51661b28j00s8bu7u0011d200ak00esg00ak00es.jpg&thumbnail=660x2147483647&quality=80&type=jpg"
                        alt="">
                    <div class="exp">
                        榴莲
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="seafood">
            <div class="cardBox">
                <!-- 海鲜类产品 -->
                <div class="card" data-categories="seafood">
                    <img class="cardimg" src="https://img1.baidu.com/it/u=778166758,516270675&fm=253&app=138&f=JPEG?w=800&h=1067"
                        alt="">
                    <div class="exp">
                        三文鱼
                    </div>
                </div>
                <div class="card" data-categories="seafood">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=3618773828,915524512&fm=253&app=138&f=JPEG?w=800&h=1067"
                        alt="">
                    <div class="exp">
                        北极虾
                    </div>
                </div>
                <div class="card" data-categories="seafood">
                    <img class="cardimg" src="https://img0.baidu.com/it/u=1050036474,286970756&fm=253&app=138&f=JPEG?w=684&h=1216"
                        alt="">
                    <div class="exp">
                        鲍鱼
                    </div>
                </div>
                <div class="card" data-categories="seafood">
                    <img class="cardimg" src="https://img0.baidu.com/it/u=1082575714,3071582903&fm=253&app=138&f=JPEG?w=800&h=1069"
                        alt="">
                    <div class="exp">
                        深海鳕鱼
                    </div>
                </div>
                <div class="card" data-categories="seafood">
                    <img class="cardimg" src="https://img1.baidu.com/it/u=2953413950,1826854074&fm=253&app=138&f=JPEG?w=800&h=1067"
                        alt="">
                    <div class="exp">
                        扇贝
                    </div>
                </div>
                <div class="card" data-categories="seafood">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=734267320,2143759924&fm=253&app=138&f=JPEG?w=800&h=1200"
                        alt="">
                    <div class="exp">
                        海参
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="dairy">
            <div class="cardBox">
                <!-- 奶制品 -->
                <div class="card" data-categories="dairy">
                    <img class="cardimg" src="https://img2.baidu.com/it/u=2293221284,3792355357&fm=253&app=138&f=JPEG?w=500&h=667"
                        alt="">
                    <div class="exp">
                        希腊酸奶
                    </div>
                </div>
                <div class="card" data-categories="dairy">
                    <img class="cardimg" src="https://t8.baidu.com/it/u=1782925689,2118142690&fm=193"
                        alt="">
                    <div class="exp">
                        有机奶酪
                    </div>
                </div>
                <div class="card" data-categories="dairy">
                    <img class="cardimg" src="https://img95.699pic.com/xsj/0n/ra/3z.jpg"
                        alt="">
                    <div class="exp">
                        低脂奶
                    </div>
                </div>
                <div class="card" data-categories="dairy">
                    <img class="cardimg" src="https://img0.baidu.com/it/u=2425806711,2431584252&fm=253&fmt=auto&app=138&f=JPEG?w=571&h=380"
                        alt="">
                    <div class="exp">
                        黄油
                    </div>
                </div>
                <div class="card" data-categories="dairy">
                    <img class="cardimg" src="https://miaobi-lite.bj.bcebos.com/miaobi/5mao/b%27LV8xNzMzMzE0NjUwLjA2ODU4OTI%3D%27/0.png"
                        alt="">
                    <div class="exp">
                        芝士蛋糕
                    </div>
                </div>
                <div class="card" data-categories="dairy">
                    <img class="cardimg" src="https://copyright.bdstatic.com/vcg/creative/6b422182be9a3b82bad843f13ab4c98a.jpg@wm_1,k_cGljX2JqaHdhdGVyLmpwZw=="
                        alt="">
                    <div class="exp">
                        酪乳
                    </div>
                </div>
            </div>
        </div>
        <div class="category-content" data-category="lowsugar">
            <div class="cardBox">
                <!-- 低糖食品 -->
                <div class="card" data-categories="lowsugar">
                    <img class="cardimg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcbu01.alicdn.com%2Fimg%2Fibank%2FO1CN01CYS9Ma1voLwW811Lo_%21%212214387836219.png&refer=http%3A%2F%2Fcbu01.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1748355145&t=3484ccd1d7956706a338856b6e9c8ad5"
                        alt="">
                    <div class="exp">
                        无糖饼干
                    </div>
                </div>
                <div class="card" data-categories="lowsugar">
                    <img class="cardimg" src="https://img14.360buyimg.com/pop/jfs/t1/167286/20/24131/338191/61dbdb1cE88cec3c7/959e95f24b95cbf6.jpg"
                        alt="">
                    <div class="exp">
                        代糖巧克力
                    </div>
                </div>
                <div class="card" data-categories="lowsugar">
                    <img class="cardimg" src="https://miaobi-lite.bj.bcebos.com/miaobi/5mao/b%275L2O57OW54OY54SZXzE3Mjk0MTc0MDguMTkxMTA5Nw%3D%3D%27/0.png"
                        alt="">
                    <div class="exp">
                        低糖蛋糕
                    </div>
                </div>
                <div class="card" data-categories="lowsugar">
                    <img class="cardimg" src="https://qcloud.dpfile.com/pc/-nah3kPj6koTkxCM_h375LwsGmNgz7-U9DkPOWAK1u6MpU7jk1n9-dyjZitV3vvb.jpg"
                        alt="">
                    <div class="exp">
                        低糖面包
                    </div>
                </div>
                <div class="card" data-categories="lowsugar">
                    <img class="cardimg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F952a95bd-e1a0-4959-bef7-3d3a22cc6a0e%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1748355207&t=742dadc10f7e5923cd33685963f37b71"
                        alt="">
                    <div class="exp">
                        无糖果冻
                    </div>
                </div>
                <div class="card" data-categories="lowsugar">
                    <img class="cardimg" src="https://t14.baidu.com/it/u=1304427782,1717607743&fm=224&app=112&f=JPEG?w=500&h=500"
                        alt="">
                    <div class="exp">
                        木糖醇糖果
                    </div>
                </div>
            </div>
        </div>
        <div id="empty-tip" style="display:none;height: 100px;margin-left: 50px; color:red">
            没有找到匹配的食品
        </div>
    </main>
    <script>
        // 选项卡切换功能
        document.querySelectorAll('.tab-item').forEach(tab => {
            tab.addEventListener('click', function () {
                // 移除所有激活状态
                document.querySelectorAll('.tab-item').forEach(t => t.classList.remove('active'));
                document.querySelectorAll('.category-content').forEach(c => c.classList.remove('active'));

                // 设置当前激活状态
                this.classList.add('active');
                const category = this.dataset.category;
                document.querySelector(`.category-content[data-category="${category}"]`).classList.add('active');

                // 触发搜索以更新可见性
                handleSeach();
            });
        });

        // 增强搜索功能
        function handleSeach() {
            const searchText = document.querySelector('#input').value.toLowerCase().trim();
            const activeCategory = document.querySelector('.category-content.active').dataset.category;

            document.querySelectorAll(`.category-content.active .card`).forEach(card => {
                const cardText = card.querySelector('.exp').innerText.toLowerCase();
                const isMatch = !searchText || cardText.includes(searchText);
                const inCategory = card.dataset.categories.includes(activeCategory);

                card.style.display = (isMatch && inCategory) ? 'block' : 'none';
            });

            // 显示/隐藏无结果提示
            const visibleCards = document.querySelectorAll(`.category-content.active .card[style*="block"]`);
            document.querySelector('#empty-tip').style.display = visibleCards.length ? 'none' : 'block';
        };
    </script>

    <footer class="footer">
        <div class="footer-content">
            <p>© 2025 健康食品公司 版权所有</p>
            <p>地址：上海市浦东新区健康路123号</p>
            <p>电话：021-12345678</p>
        </div>
    </footer>
</body>
<script>

    function handleSeach() {
        const searchText = document.querySelector('#input').value.toLowerCase().trim();
        const cards = document.querySelectorAll('.card');
        let hasMatch = false;

        cards.forEach(card => {
            const cardText = card.querySelector('.exp').innerText.toLowerCase();
            const isMatch = !searchText || cardText.includes(searchText);

            card.style.display = isMatch ? 'block' : 'none';
            if (isMatch) hasMatch = true;
        });

        // 显示/隐藏无结果提示
        const emptyTip = document.querySelector('#empty-tip');
        emptyTip.style.display = hasMatch ? 'none' : 'block';
    };
</script>

</html>